﻿@model Project

<script type="text/javascript" src="~/js/shared/fileUploader.min.js"></script>

<div class="container">
    <h1 class="display-4">@ViewBag.PageTitle</h1>
    <hr />

    <form asp-controller="Project" asp-action="@ViewBag.Action" method="post">

        <div class="inputRow">
            <label asp-for="Size"></label>*
            <div>
                <div class="form-check form-check-inline">
                    <input name="Size" class="form-check-input" type="radio" value="@ProjectSize.Big" @if (Model.Size == ProjectSize.Big) { Write("checked"); }>
                    <label class="form-check-label" for="inlineRadio1">Big</label>
                </div>
                <div class="form-check form-check-inline">
                    <input name="Size" class="form-check-input" type="radio" value="@ProjectSize.Middle" @if (Model.Size == ProjectSize.Middle) { Write("checked"); }>
                    <label class="form-check-label" for="inlineRadio2">Middle</label>
                </div>
                <div class="form-check form-check-inline">
                    <input name="Size" class="form-check-input" type="radio" value="@ProjectSize.Small" @if (Model.Size == ProjectSize.Small) { Write("checked"); }>
                    <label class="form-check-label" for="inlineRadio3">Small</label>
                </div>
            </div>
        </div>

        <div class="inputRow">
            <label asp-for="Name"></label>*
            <input asp-for="Name" type="text" autocomplete="off" class="form-control" />
        </div>

        <div class="inputRow">
            <label asp-for="Detail"></label>*（Support HTML）
            <input asp-for="Detail" type="text" autocomplete="off" class="form-control" />
        </div>

        <div class="inputRow">
            <label asp-for="CoverUrl"></label>*
            <div class="input-group mb-3">
                <input asp-for="CoverUrl" type="text" autocomplete="off" class="form-control" id="coverUrl" />
                <input id="fileSelector" type="file" onchange="uploadProjectCover()" hidden />
                <div class="input-group-append">
                    <button id="uploading" class="btn btn-outline-secondary" type="button" onclick="upload()">Upload Cover</button>
                </div>
            </div>
        </div>

        <div class="inputRow">
            <label asp-for="Link"></label>*
            <input asp-for="Link" type="text" autocomplete="off" class="form-control" />
        </div>

        <div class="inputRow">
            <label asp-for="Tip"></label>*
            <input asp-for="Tip" type="text" autocomplete="off" class="form-control" />
        </div>

        <input type="submit" value="Submit" class="btn btn-success" />
    </form>
</div>